﻿
@{
    ViewBag.Title = "保证金支付结果";
}
<style type="text/css">
    * {
        margin: 0;
        padding: 0;
        font-family: 'microsoft yahei','simsun';
        box-sizing:content-box;
    }

    body {
        background: #f2f2f2;
    }

    .w {
        width: 990px;
        padding: 0;
        margin: 0 auto;
        zoom: 1;
    }

    .tips-page {
        width: 345px;
        height: 170px;
        padding: 160px 165px 60px 475px;
        font-size: 12px;
        overflow: hidden;
        color: #777;
        margin: 100px 0 35px;
        background: url(/images/error.jpg) #fff no-repeat 150px 30px;
        border: 1px solid #ddd;
    }

    .pay-success-page{ background-image:url(/images/success.jpg)}
        .tips-page h2 {
            font-size: 20px;
            margin-bottom: 10px;
            color: #E4393C;
            font-weight: normal;
        }

        .tips-page p {
            font-size: 14px;
        }

        .tips-page a {
            color: #e3393c;
        }
</style>


<div class="w">
    @{
        var errorMsg = ViewBag.Error;
        var flag = !string.IsNullOrWhiteSpace(errorMsg) ? "fail" : "success";
        var redirectUrl = string.IsNullOrWhiteSpace(errorMsg) ? ("/selleradmin?url=/selleradmin/CashDeposit/Management") : "/";
        var htmlPart = string.IsNullOrWhiteSpace(errorMsg) ? ("秒后自动跳至保证金页面<a  href=\"/selleradmin?url=/selleradmin/CashDeposit/Management&tar=CashDeposit\" class=\"link_1\">保证金页面</a>") : "";
    }
    <div class="tips-page pay-@flag-page">
        @if (string.IsNullOrWhiteSpace(errorMsg))
        {
            <h2>
                恭喜您，支付成功！
            </h2>
        }
        else
        {
            <h2>
                抱歉，支付失败！请重新支付！
            </h2>
            <div class="error_child">您可以：<a href="/selleradmin?url=/selleradmin/CashDeposit/Management&tar=CashDeposit">返回保证金支付页面</a></div>
        }

        <div id="ShowDiv"></div>
    </div>

</div>


<script>
    $(function () {
        $('.progress-').hide();
    })

    var secs = 5; //倒计时的秒数
    var URL ;
    function Load(url){
        URL =url;
        for(var i=secs;i>=0;i--)
        {
            window.setTimeout('doUpdate(' + i + ')', (secs-i) * 1000);
        }
    }

    function doUpdate(num)
    {
        document.getElementById("ShowDiv").innerHTML = '将在<strong><font color=red> '+num+' </font></strong>@Html.Raw(htmlPart)，请稍候...' ;
        if(num == 0) { window.location=URL;  }
    }
    $(function(){
        Load("/selleradmin?url=/selleradmin/CashDeposit/Management&tar=CashDeposit");
    })



</script>